package com.singfan.manage.vm;

import com.singfan.manage.vm.partial.ShopNameItem;

import java.util.List;

/**
 * Author: hansonghe
 * Date: 2015-10-16 10:05
 * Desc:
 */
public class ShopNameModel extends ViewModelBase {
    private String nameList;

    public String getNameList() {
        return nameList;
    }

    public void setNameList(String nameList) {
        this.nameList = nameList;
    }

    public static ShopNameModel createWithShopNameItem(List<ShopNameItem> itemList){
        ShopNameModel shopNameModel = new ShopNameModel();
        StringBuilder sb = new StringBuilder();
        for (ShopNameItem shopNameItem : itemList){
            sb.append(shopNameItem.toString());
        }
        shopNameModel.setNameList(sb.toString());

        return shopNameModel;
    }
}
